<%@ page import="com.hf.constant.OrderLunchConst"%>
<%@ page import="com.hf.date.DateUtils"%>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><g:layoutTitle default="Grails" /></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon"
	href="${resource(dir: 'images', file: 'favicon.ico')}"
	type="image/x-icon">
<link rel="apple-touch-icon"
	href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
<link rel="apple-touch-icon" sizes="114x114"
	href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
<g:javascript library="jquery"></g:javascript>
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow'
	rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}"
	type="text/css">
<link rel="stylesheet"
	href="${resource(dir: 'css', file: 'gtunes.css')}" type="text/css">
<link rel="stylesheet"
	href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
<g:layoutHead />
<r:layoutResources />
</head>
<body>
	<div id="grailsLogo" role="banner">
		<a href="http://grails.org"><img
			src="${resource(dir: 'images', file: 'grails_logo.png')}"
			alt="Grails" /></a>
	</div>
	<g:if test="${session?.user}">
	<div class="dataDiv">
		<h1>
			Welcome to Order Lunch, ${session?.user?.name}!
			<g:link controller="orderUser" action="logout">Logout</g:link>
			<span style="float:right">Period ${OrderLunchConst.curOrderPeriodType }: ${DateUtils.getPeriodStartEndDayString() }</span>
		</h1>
		<div>
			<g:link controller="userOrderHistory" action="todayOrderStatus">Today Order Status</g:link> |
			<g:link controller="userOrderHistory" action="todayOrderedList">Today ordered list</g:link> |
			<g:link controller="userOrderHistory" action="userOrderPeriodHistory">Monthly Order History</g:link> |
			<g:link controller="orderUser" action="orderSetting">Order Setting</g:link> |
			<g:link controller="welcome" action="readMe">Read me</g:link> |
			<g:link controller="fileManager" action="downloadFile">Guide</g:link>
			<g:if test="${session?.user?.name == OrderLunchConst.ADMIN_NAME}">
				<br/>
				<g:link controller="userOrderHistory" action="monthOrderStatsHistory">This Month Order History</g:link> |
				<g:link controller="userOrderHistory" action="allUserPeriodStats">All User Period Statistics</g:link> |
			</g:if>
			<g:if test="${OrderLunchConst.isAdmin(session?.user?.name)}">
				<br/>
				<g:link controller="adminOperation" action="index">Admin Operation</g:link> |
			</g:if>
		</div>
		</div>
	</g:if>
	<g:layoutBody />
	<div class="footer" role="contentinfo"></div>
	<div id="spinner" class="spinner" style="display: none;">
		<g:message code="spinner.alt" default="Loading&hellip;" />
	</div>
	<g:javascript library="application" />
	<r:layoutResources />
</body>
</html>
